<view class="P-equity">
    <view class="P-equityHead">
        <nav title="{{title}}" bindnavtap="goHome"></nav>
    </view>

    <view class="P-equityPage" style="background-color:{{conf.aggr_page_background}}">
        <scroll-view scroll-x="true" scroll-y="false">
            <view class="cards">
                <view class="item {{index==act?'act':''}}" wx:for="{{cards}}" bindtap="chooseCard" data-index="{{index}}" style="background-image: url({{conf.background}})">
                    <view class="gift"></view>
                    <view class="wrap" style="background-color: {{index==act?conf.selected_color:''}}">
                        <view class="in">
                            <view class="name">{{item.name}}</view>
                            <view class="price">
                                <text class="coin">￥</text>{{item.price}}
                            </view>
                            <view class="origin">(非会员价：{{item.original_price}}元)</view>
                        </view>
                    </view>
                </view>
            </view>
        </scroll-view>
        <view class="con">
            <view class="in">
                <image class="{{loaded?'s':''}}" style="width: {{imgWidth}}" bindload="loadImg" src="{{cards[act].pic}}" ng-if="cards[act].pic" mode="widthFix"></image>
            </view>
        </view>
        <view class="foot">
            <view class="shop">
                <view class="item">
                    <view>门店：{{shop.store_code}}</view>
                    <text bindtap="changeShop">切换</text>
                </view>
                <view class="item" wx:if="{{emp_no}}">
                    <view>员工编号：{{emp_no}}</view>
                </view>
            </view>
            <view class="member" bindtap="check">
                <view class="ck {{checked?'s':''}}"></view>
                <view class="desc">购买权益包，优惠将派发到您的{{ent_name}}会员卡中，同时表示您已阅读<text bindtap="maintain" data-type="0">《{{ent_name}}会员卡使用规则》</text>和 <text bindtap="maintain" data-type="1">《用户信息声明》</text></view>
            </view>
            <!-- //没有可选的权益包也不可提交 -->
            <button class="button {{(!checked || lock)?'disable':''}}" style="background-color: {{(!checked || lock || !cards.length)?'gray':conf.button_background}}" disabled="{{!checked || lock || !cards.length}}" bindtap="buy">{{cards[act].buy_button_text}}</button>
        </view>
    </view>

    <view class="P-equityPop" wx:if="{{showPop}}">
        <view class="mask" bindtap="togglePop"></view>
        <view class="P-equityPopConn">
            <view class="head">
                <view class="l">
                    <!-- chooseArea -->
                    <view class="area" bindtap="selectArea">
                        <view class="addr">
                            <view class="rect">
                                <view class="region">{{(area && area.province)||'省份'}}</view>
                                <view class="region">{{(area && area.city)||'城市'}}</view>
                            </view>
                        </view>
                        <view class="arrow"></view>
                    </view>
                    <view class="loca" bindtap="resetLoca">
                        <view class="ico"></view>
                        <text>获取定位</text>
                    </view>
                </view>
                <view class="close" catchtap="togglePop">+</view>
            </view>

            <view class="search">
                <input type="text" value="{{name}}" bindconfirm="search" placeholder="输入门店名称查找门店" />
            </view>

            <view class="wrap">
                <list id="list" request="{{listRequest}}" bind:ondata="onData" generic:component="card-shop" bind:oncard="onCard" height="100%" scroll-top="{{scrollTop}}" show-empty="{{showEmpty}}" ext="{{ext}}" fallback="{{fallback}}">
                    <view class="empty" slot="after" wx:if="{{showEpt}}">
                        <view class="M-empty M-emptyEquity"></view>
                    </view>
                </list>
            </view>
        </view>
    </view>

    <address data="{{area}}" show="{{showAddr}}" bindclose="closeAddr" bindconfirm="confirmAddr" map="{{areaMap}}"></address>

    <loading show="{{showLoading}}"></loading>
</view>